package cn.edu.xmu.oomall.payment.model.vo;

import cn.edu.xmu.oomall.payment.model.bo.Refund;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 张浩山
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ShopRefundRetVo {
    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "支付id")
    private Long paymentId;
    @ApiModelProperty(value = "支付交易流水号")
    private String tradeSn;
    @ApiModelProperty(value = "支付渠道")
    private Long patternId;
    @ApiModelProperty(value = "支付金额")
    private Long amount;
    @ApiModelProperty(value = "状态")
    private Byte state;
    @ApiModelProperty(value = "单据号")
    private String documentId;
    @ApiModelProperty(value = "单据类型")
    private Byte documentType;

    public ShopRefundRetVo(Refund refund) {
        id = refund.getId();
        paymentId = refund.getPaymentId();
        tradeSn = refund.getTradeSn();
        patternId = refund.getPatternId();
        amount = refund.getAmount();
        state = refund.getState();
        documentId = refund.getDocumentId();
        documentType = refund.getDocumentType();
    }
}
